package io.gitee.horizon007.webspider.transformer;

import io.gitee.horizon007.webspider.WebSpider;
import io.gitee.horizon007.webspider.annotation.Context;
import io.gitee.horizon007.webspider.metadata.PropertyMetadata;
import org.jsoup.select.Elements;

public interface ValueTransformer {

    default boolean isAsync() {
        return false;
    }

    Object transform(
            WebSpider webSpider,
            Elements elements,
            Object instance,
            PropertyMetadata propertyMetadata,
            Context annotation
    ) throws Throwable;

}
